package com.hualan.sfzyproject.controller.User;

import com.hualan.sfzyproject.mapper.FmMapper;
import com.hualan.sfzyproject.service.admin.FmService;
import com.hualan.sfzyproject.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user/fm")
public class Fmcontroller {
    @Autowired
    private FmService fmService;
    @Autowired
    private FmMapper fmMapper;
        //根据课程类型id查询
        @GetMapping("/id")
        public R getFMListByCourseTypeId(Long id){
            return R.ok(fmMapper.selectByCourseTypeId(id));
    }
    @GetMapping("/detail")
    public R getFMDetailByCourseTypeId(Long id){
        return R.ok(fmMapper.getFMDetailByFmId(id));
    }
}
